import {commomParams,options} from "./config.js";
import jsonp from "commom/js/jsonp"

export function getSinger(){
  let url = 'https://c.y.qq.com/v8/fcg-bin/v8.fcg'
  let data = {
    g_tk: 1928093487,
    format: 'jsonp',
    channel: 'singer',
    page: 'list',
    key: 'all_all_all',
    pagesize: 100,
    pagenum: 1,
    platform: 'yqq',
  }
  let urldata = Object.assign({},commomParams,data);
  return jsonp(url, urldata, options)
}

export function getSingerDetail(id){
  let url = 'https://c.y.qq.com/v8/fcg-bin/fcg_v8_singer_track_cp.fcg'
  let data = {
    g_tk: 1928093487,
    format: 'jsonp',
    platform: 'yqq',
    order: 'listen',
    begin: 0,
    num: 80,
    songstatus: 1,
    singermid: id,
  }
  let urldata = Object.assign({},commomParams,data);
  return jsonp(url,urldata,options)
}